<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
    <div class="layui-form timo-compile">
    <form th:action="@{/web/hospital/save}">
        <input type="hidden" name="id" th:if="${hospital}" th:value="${hospital.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">医院名称</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="title" placeholder="请输入医院名称" th:value="${hospital?.title}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">医院地址</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="locations" placeholder="请输入医院地址" th:value="${hospital?.locations}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="tel" placeholder="请输入联系电话" th:value="${hospital?.tel}">
            </div>
        </div>
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">缩略图</label>-->
<!--            <div class="layui-input-inline">-->
<!--                <input class="layui-input" type="text" name="thums" placeholder="请输入缩略图" th:value="${hospital?.thums}">-->
<!--            </div>-->
<!--        </div>-->
        <div class="layui-form-item">
            <label class="layui-form-label">图片</label>
            <div class="layui-input-inline">
                <div class="layui-form-item">
                    <label class="layui-form-label">上传图片</label>
                    <div class="layui-input-inline">
                        <button type="button" class="layui-btn upload-image" name="image[]" up-field="url" up-url="/upload/image">
                            <i class="layui-icon"></i>上传图片
                        </button>
                    </div>
                    <div class="upload-show" style="margin-left:0px;">
                        <img th:src="${hospital?.thums}" style="width:100px;height:100px;padding-top:5px;"/>
                    </div>
                </div>
                <input id="file_id" type="hidden" name="file_id" placeholder="请输入图片">
                <input id="ac_photo" class="layui-input" type="hidden" name="thums" placeholder="请输入图片" th:value="${hospital?.thums}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">查看数量</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="views" placeholder="请输入查看数量" th:value="${hospital?.views}">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea" name="remark">[[${hospital?.remark}]]</textarea>
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
</body>
</html>